package com.example.service;

import com.example.mapper.PostMapper;
import com.example.pojo.entity.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * @author 小岁
 * @version 2023/11/1 15:39
 */
@Service
public class RedisHitsServiceImpl implements RedisHitsService {

    private static final String Hits_KEY = "id:pos_hits";

    @Autowired
    private PostService postService;
    @Autowired
    private StringRedisTemplate redisTemplate;

    @Autowired
    private PostMapper postMapper;


    @Override
    public int update(Integer pH,Integer id) {
        return postMapper.updates(pH,id);
    }

    @Override
    public List<Post> limitPost() {
        return postMapper.limitPost();
    }
}
